<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: 任宝顺
  Date: 2022/3/5
  Time: 14:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加饮品</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
</head>
<body>
<div id="wrap">
    <div id="top_content">
        <div id="header">
            <div id="rightheader">
                <p>
                    <% Date date = new Date();
                        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                        String now = sdf.format(date);
                    %>
                    <%=now%>
                    <br />
                </p>
            </div>
            <div id="topheader">
                <h1 id="title">
                    <a href="#">main</a>
                </h1>
            </div>
            <div id="navigation">
            </div>
        </div>
        <div id="content">
            <p id="whereami">
            </p>
            <h1>
                添加饮品信息
            </h1>
            <form action="${pageContext.request.contextPath}/grang/insertTea.do" method="post">
                <table cellpadding="0" cellspacing="0" border="0"  class="form_table">
                    <tr>
                        <td valign="middle" align="right">
                            饮品名称:
                        </td>
                        <td valign="middle" align="left">
                            <input type="text" class="inputgri" name="teaName" />
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            饮品价格:
                        </td>
                        <td valign="middle" align="left">
                            <input type="text" class="inputgri" name="teaPrice" />
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            饮品类别:
                        </td>
                        <td valign="middle" align="left">
                            <select name="cateId">
                                <c:forEach items="${categories}" var="category">
                                <option value="${category.categoryId}">${category.categoryName}</option>
                                </c:forEach>
                            </select>
                        </td>
                    </tr>
                </table>
                <p>
                    <input type="submit"  class="button" value="添加" />
                </p>
            </form>
        </div>
    </div>
    <div id="footer">
        <div id="footer_bg">
            ABC@126.com
        </div>
    </div>
</div>
</body>
</html>
